@use "../global/variables";

.product__container {
  z-index: 1;
  padding: 20px 20px 60px;
}

.product__picture-container {
  display: block;
  margin-bottom: 10px;
}

.product {
  &--flat-white {
    background-color: variables.$flat-white;
  }

  &--lavender-latte {
    background-color: variables.$lavender-latte;
  }

  &--espresso {
    background-color: variables.$espresso;
  }
}

.product__subheading {
  margin-bottom: 5px;
}

.product__heading {
  margin: 0 0 10px;
  letter-spacing: 0.02em;
  font-weight: 700;
  font-size: 36px;
  line-height: 48px;
}

.product__description {
  margin: 0 0 19px;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
}

.product__actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product__button {
  margin-left: 20px;
}

.product__cost {
  font-weight: 600;
  font-size: 20px;
  line-height: 32px;

  &:not(&--old) {
    margin-left: 6px;
  }

  &--old {
    font-weight: 400;
    font-size: 16px;
    line-height: 32px;
    color: variables.$blue-primary;
    text-decoration: line-through;
  }
}

@media (min-width: variables.$min-tablet-width) {
  .product {
    &::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 188px;
      background-color: variables.$base-white;
    }
  }

  .product__container {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 60px 60px 0;
  }

  .product__picture-container {
    order: 1;
    margin-bottom: 0;
  }

  .product__picture {
    width: auto;
    height: auto;
  }

  .product__heading {
    margin-bottom: 15px;
    font-size: 56px;
    line-height: 80px;
  }

  .product__subheading {
    margin-bottom: 5px;
  }

  .product__description {
    margin-bottom: 20px;
    font-size: 20px;
    line-height: 32px;
  }

  .product__actions {
    margin-bottom: 20px;
  }
}

@media (min-width: variables.$min-desktop-width) {
  .product {
    &::after {
      display: none;
    }
  }

  .product__container {
    flex-direction: row-reverse;
    padding: 30px 80px 84px;
    text-align: left;
  }

  .product__picture-container {
    flex-shrink: 0;
    width: 600px;
    margin-left: 25px;
  }

  .product__wrapper {
    margin-left: 30px;
    padding-top: 150px;
    padding-right: 30px;
  }

  .product__description {
    margin-bottom: 40px;
  }

  .product__actions {
    justify-content: flex-start;
  }
}
